﻿//定义组织结构数据模型
Ext.define
(
    'Organization',
    {
    	extend: 'Ext.data.Model',
    	fields: ['ID', 'Name'],
    	idProperty: 'ID'
    }
);

//定义项目数据模型
Ext.define
(
    'ProjectReferenceModal',
    {
    	extend: 'Ext.data.Model',
    	fields: ['ID', 'Code', 'Name'],
    	idProperty: 'ID'
    }
);

//定义账号列表行数据模型
Ext.define
(
    'AccountListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'UserID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'LoginName', type: 'string' },
            { name: 'UserName', type: 'string' },
            { name: 'IsEnabled', type: 'boolean' },
            { name: 'IsBuildin', type: 'boolean' },
            { name: 'LastLoginTime', type: 'date' },
            { name: 'IsAllowDelay', type: 'boolean' },
            { name: 'DelayBeginDate', type: 'date' },
            { name: 'DelayEndDate', type: 'date' },
            { name: 'DelayExpiration', type: 'date' },
            { name: 'Memo', type: 'string' }
        ],
    	idProperty: 'UserID'
    }
);

//定义账户详细信息数据模型
Ext.define
(
    'AccountDetail',
    {
    	extend: 'Ext.data.Model',
    	fields: ['UserID', 'Roles', 'OrganizationID', 'UserName', 'LoginName', 'Password', 'ConfirmPassword', 'IsEnabled', 'IsBuildin', 'Memo'],
    	idProperty: 'UserID'
    }
);

//定义账号列表行数据模型
Ext.define
(
    'ProjectModal',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ProjectID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'CategoryID', type: 'string' },
            { name: 'Category', type: 'string' },
            { name: 'State', type: 'number' },
            { name: 'Roadway', type: 'string' },
            { name: 'BeginStake', type: 'string' },
            { name: 'EndStake', type: 'string' },
            { name: 'GrantNumber', type: 'string' },
            { name: 'StartDate', type: 'date' },
            { name: 'CompletionDate', type: 'date' },
            { name: 'ProjectLeader', type: 'string' },
            { name: 'TechnicalChief', type: 'string' },
            { name: 'QualityChief', type: 'string' },
            { name: 'Budget', type: 'number' },
            { name: 'ApprovedBudget', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'CloseDate', type: 'date' }
        ],
    	idProperty: 'ProjectID'
    }
);

//定义路线列表行数据模型
Ext.define
(
    'RoadwayListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'RoadwayID', type: 'string' },
            { name: 'RoadwayCode', type: 'string' },
            { name: 'RoadwayName', type: 'string' }
        ],
    	idProperty: 'RoadwayID'
    }
);

//定义字典项目数据模型
Ext.define
(
    'DictionaryItemListRow',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ItemID', type: 'string' },
            { name: 'DictionayID', type: 'number' },
            { name: 'ItemName', type: 'string' },
            { name: 'ItemValue', type: 'string' },
            { name: 'ItemPinYin', type: 'string' }
        ],
    	idProperty: 'ItemID'
    }
);

//定义树形字典数据模型
Ext.define
(
    'TreeNodeData',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'id', type: 'string' },
            { name: 'parentID', type: 'string' },
            { name: 'code', type: 'string' },
            { name: 'name', type: 'string' },
            { name: 'category', type: 'number' },
            { name: 'categoryName', type: 'string' },
            { name: 'pinyin', type: 'string' },
            { name: 'unit', type: 'string' },
            { name: 'leaf', type: 'boolean' },
            { name: 'expanded', type: 'boolean' },
            { name: 'data', type: 'array' },
            { name: 'iconCls', type: 'string' }
        ],
    	idProperty: 'id'
    }
);

//定义简单树形数据模型
Ext.define
(
    'CheckTreeNode',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'id', type: 'string' },
            { name: 'parentID', type: 'string' },
            { name: 'text', type: 'string' },
            { name: 'leaf', type: 'boolean' },
            { name: 'checked', type: 'boolean' },
            { name: 'expanded', type: 'boolean' },
            { name: 'data', type: 'array' },
            { name: 'iconCls', type: 'string' }
        ],
    	idProperty: 'id'
    }
);

//定义项目附件数据模型
Ext.define
(
    'ProjectAttachmentModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'AttachmentID', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'IsOpen', type: 'boolean' },
            { name: 'AttachmentName', type: 'string' },
            { name: 'FileExtension', type: 'string' },
            { name: 'Url', type: 'string' }
        ],
    	idProperty: 'AttachmentID'
    }
);

//定义养护工程量数据模型
Ext.define
(
    'MaintainQuantityModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'MaintainCode', type: 'string' },
            { name: 'Roadway', type: 'string' },
            { name: 'BeginStake', type: 'string' },
            { name: 'EndStake', type: 'string' },
            { name: 'CategoryID', type: 'string' },
            { name: 'Category', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'string' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'QuantityID'
    }
);


//定义养护工程量参照模型
Ext.define
(
    'MaintainQuantityReferenceModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'QuantityID', type: 'string' },
            { name: 'MaintainCode', type: 'string' },
            { name: 'Category', type: 'string' },
            { name: 'ApplicationDate', type: 'date' }
        ],
    	idProperty: 'QuantityID'
    }
);

//定义养护人工数据模型
Ext.define
(
    'MaintainLabourModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'LabourID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'JobID', type: 'string' },
            { name: 'Job', type: 'string' },
            { name: 'LabourTypeID', type: 'string' },
            { name: 'LabourType', type: 'string' },
            { name: 'MaintainCode', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'LabourID'
    }
);

//定义养护机械数据模型
Ext.define
(
    'MaintainMachineModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'MaintainMachineID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'MachineID', type: 'string' },
            { name: 'Machine', type: 'string' },
            { name: 'MaintainCode', type: 'string' },
            { name: 'MachineType', type: 'string' },
            { name: 'MachineTypeID', type: 'string' },
            { name: 'MachineUnit', type: 'string' },
            { name: 'MachineUnitID', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'OilTypeID', type: 'string' },
            { name: 'OilType', type: 'string' },
            { name: 'OilWear', type: 'number' },
            { name: 'OilPrice', type: 'number' },
            { name: 'OilAmount', type: 'number' },
            { name: 'MaintenanceCost', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'MaintainMachineID'
    }
);

//定义养护材料数据模型
Ext.define
(
    'MaintainMaterialModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'MaintainMaterialID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'MaterialID', type: 'string' },
            { name: 'Material', type: 'string' },
            { name: 'MaintainCode', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'MaintainMaterialID'
    }
);

//定义养护日志数据模型
Ext.define
(
    'MaintainJournalModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'JournalID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'Weather', type: 'string' },
            { name: 'Content', type: 'string' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'JournalID'
    }
);

//定义照片数据模型
Ext.define
(
    'PhotoModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'PhotoID', type: 'string' },
            { name: 'JournalID', type: 'string' },
            { name: 'PhotoName', type: 'string' },
            { name: 'FileExtension', type: 'string' },
            { name: 'Url', type: 'string' },
            { name: 'Memo', type: 'string' }
        ],
    	idProperty: 'PhotoID'
    }
);


//定义项目工程量数据模型
Ext.define
(
    'ProjectQuantityModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Signer', type: 'string' },
            { name: 'SignedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'QuantityID'
    }
);


//定义项目工程量参照模型
Ext.define
(
    'ProjectQuantityReferenceModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'QuantityID', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'ApplicationDate', type: 'date' }
        ],
    	idProperty: 'QuantityID'
    }
);

//定义项目人工数据模型
Ext.define
(
    'ProjectLabourModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'LabourID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'JobID', type: 'string' },
            { name: 'Job', type: 'string' },
            { name: 'LabourTypeID', type: 'string' },
            { name: 'LabourType', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Signer', type: 'string' },
            { name: 'SignedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'LabourID'
    }
);

//定义项目机械数据模型
Ext.define
(
    'ProjectMachineModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ProjectMachineID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'MachineID', type: 'string' },
            { name: 'Machine', type: 'string' },
            { name: 'MachineUnit', type: 'string' },
            { name: 'MachineUnitID', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'OilTypeID', type: 'string' },
            { name: 'OilType', type: 'string' },
            { name: 'OilWear', type: 'number' },
            { name: 'OilPrice', type: 'number' },
            { name: 'OilAmount', type: 'number' },
            { name: 'MaintenanceCost', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Signer', type: 'string' },
            { name: 'SignedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'ProjectMachineID'
    }
);

//定义项目材料数据模型
Ext.define
(
    'ProjectMaterialModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ProjectMaterialID', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'QuantityID', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'MaterialID', type: 'string' },
            { name: 'Material', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Signer', type: 'string' },
            { name: 'SignedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'ProjectMaterialID'
    }
);

//定义项目日志数据模型
Ext.define
(
    'ProjectJournalModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'JournalID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'Weather', type: 'string' },
            { name: 'Content', type: 'string' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'date' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Signer', type: 'string' },
            { name: 'SignedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'JournalID'
    }
);

//定义图片数据模型
Ext.define
(
    'Image',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ID', type: 'string' },
            { name: 'Caption', type: 'string' },
            { name: 'Url', type: 'string' },
            { name: 'Memo', type: 'string' }
        ]
    }
);

//定义上传文件数据模型
Ext.define
(
    'UploadFileModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'FileID', type: 'string' },
            { name: 'OwnerID', type: 'string' },
            { name: 'FileType', type: 'number' },
            { name: 'FileName', type: 'string' },
            { name: 'DisplayName', type: 'string' },
            { name: 'IsOpen', type: 'boolean' },
            { name: 'Memo', type: 'string' }
        ],
    	idProperty: 'FileID'
    }
);

//定义应急反应数据模型
Ext.define
(
    'EmergencyReactionModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'ReactionID', type: 'string' },
            { name: 'WeatherWarning', type: 'string' },
            { name: 'ReactionLevel', type: 'string' },
            { name: 'AlarmLevel', type: 'string' },
            { name: 'Poster', type: 'string' },
            { name: 'PostDate', type: 'date' },
            { name: 'ExpireDate', type: 'date' },
            { name: 'ExpireDuration', type: 'number' }
        ],
    	idProperty: 'ReactionID'
    }
);

//定义突发事件数据模型
Ext.define
(
    'EmergencyModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'EmergencyID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'Title', type: 'string' },
            { name: 'State', type: 'number' },
            { name: 'PostType', type: 'number' },
            { name: 'Content', type: 'string' },
            { name: 'Creater', type: 'string' },
            { name: 'CreateDate', type: 'date' },
        ],
    	idProperty: 'EmergencyID'
    }
);

//定义突发事件数据模型
Ext.define
(
    'EmergencyAttachmentModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'AttachmentID', type: 'string' },
            { name: 'EmergencyID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'AttachmentName', type: 'string' },
            { name: 'FileExtension', type: 'string' },
            { name: 'Url', type: 'string' }
        ],
    	idProperty: 'AttachmentID'
    }
);

//定义指令数据模型
Ext.define
(
    'InstructionModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'InstructionID', type: 'string' },
            { name: 'InstructionType', type: 'number' },
            { name: 'Title', type: 'string' },
            { name: 'State', type: 'number' },
            { name: 'PostType', type: 'number' },
            { name: 'Content', type: 'string' },
            { name: 'Creater', type: 'string' },
            { name: 'CreateDate', type: 'date' },
        ],
    	idProperty: 'InstructionID'
    }
);

//定义养护计划数据模型
Ext.define
(
    'MaintainPlanModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'PlanID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'CreateDate', type: 'date' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'string' },
            { name: 'Amount', type: 'number' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'IsDelay', type: 'boolean' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'PlanID',
    	hasMany:
        [
            {
            	model: 'MaintainPlanItemModel',
            	name: 'Items'
            }
        ]
    }
);

//定义养护计划条目数据模型
Ext.define
(
    'MaintainPlanItemModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'PlanItemID', type: 'string' },
            { name: 'PlanID', type: 'string' },
            { name: 'CategoryID', type: 'string' },
            { name: 'Category', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' }
        ],
    	idProperty: 'PlanItemID'
    }
);

//定义工程计划数据模型
Ext.define
(
    'ProjectPlanModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'PlanID', type: 'string' },
            { name: 'OrganizationID', type: 'string' },
            { name: 'Organization', type: 'string' },
            { name: 'ProjectID', type: 'string' },
            { name: 'ProjectName', type: 'string' },
            { name: 'ProjectCode', type: 'string' },
            { name: 'Version', type: 'number' },
            { name: 'Amount', type: 'number' },
            { name: 'Applicant', type: 'string' },
            { name: 'ApplicationDate', type: 'string' },
            { name: 'Auditor', type: 'string' },
            { name: 'AuditedDate', type: 'date' },
            { name: 'Approver', type: 'string' },
            { name: 'ApprovedDate', type: 'date' },
            { name: 'State', type: 'number' },
            { name: 'Memo', type: 'string' },
            { name: 'Comment', type: 'string' }
        ],
    	idProperty: 'PlanID',
    	hasMany:
        [
            {
            	model: 'ProjectPlanItemModel',
            	name: 'Items'
            }
        ]
    }
);

//定义工程计划条目数据模型
Ext.define
(
    'ProjectPlanItemModel',
    {
    	extend: 'Ext.data.Model',
    	fields:
        [
            { name: 'PlanItemID', type: 'string' },
            { name: 'PlanID', type: 'string' },
            { name: 'ConstructionID', type: 'string' },
            { name: 'Construction', type: 'string' },
            { name: 'Quantity', type: 'number' },
            { name: 'Unit', type: 'string' },
            { name: 'Price', type: 'number' },
            { name: 'Amount', type: 'number' }
        ],
    	idProperty: 'PlanItemID'
    }
);